﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace AutoChess
{
     class GridOpretionMsg : OpretionMsg
    {
        public ACGrid action;

        public GridOpretionMsg(ACGrid action) : base(OpretionType.Grid)
        {
            this.action = action;
        }

        public static SelectGridMsg NewSelectGridMsg(ACGrid action)
        {
            return new SelectGridMsg(action);
        }
        public static SwitchGridHeroMsg NewSwitchGridHeroMsg(ACGrid from, ACGrid to)
        {
            return new SwitchGridHeroMsg(from, to);
        }
        public static HighLightGridMsg NewHighLightGridMsg(ACGrid action)
        {
            return new HighLightGridMsg(action);
        }
    }

    /// <summary>
    /// 选中格子
    /// </summary>
     class SelectGridMsg : GridOpretionMsg
    {
        public SelectGridMsg(ACGrid action) : base(action)
        {
        }
    }

     class SwitchGridHeroMsg : GridOpretionMsg
    {
        public ACGrid targetGrid;
        public SwitchGridHeroMsg(ACGrid from, ACGrid to) : base(from)
        {
            targetGrid = to;
        }
    }

     class HighLightGridMsg : GridOpretionMsg
    {
        public HighLightGridMsg(ACGrid action) : base(action)
        {
        }
    }
}